#!/bin/ksh

# Script name math.ksh
# This script find the cube of a number, and the 
# quotient and remainder of the number divided by 4

y=99

(( cube = y * y * y ))
(( quotient = y / 4 ))
(( rmdr = y % 4 ))

print "The cube of $y is $cube."
print "The quotient of $y divided by 4 is $quotient."
print "The remainder of $y divided by 4 is $rmdr."

#Notice the use of parethensis to 
#control the order of evaluating

(( z = 2 * (quotient * 4 + rmdr) ))
print "Two times $y is $z"

